﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.IO;
using System.ComponentModel;
using FotoBrowserWPF.View;
using FotoBrowserWPF.Controler;
using FotoBrowserWPF.Model.DB;

namespace FotoBrowserWPF
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class MainWindow : Window,IFotoBrowserView
    {
        public event RoutedEventHandler Click_Next;
        public void OnClick_Next(object sender, RoutedEventArgs e)
        {
            if (Click_Next != null)
                Click_Next(sender, e);
        }

        public event RoutedEventHandler Click_Previous;
        public void OnClick_Previous(object sender, RoutedEventArgs e)
        {
            if (Click_Previous != null)
                Click_Previous(sender, e);
        }

        public FotoBrowserViewData ViewData
        {
            get;
            set;
        }

        FotoBrowserControler _controler;
        public MainWindow()
        {
            IFileSystem fs = new WinFileSystem(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures));
            IMetaDataStore store=new ADODAL();
            FotoBrowserModel _model = new FotoBrowserModel(store, fs);
            _controler = new FotoBrowserControler(this, _model);
            _controler.Init();
            InitializeComponent();
            
        }

       

        public void Next_Click(object sender, RoutedEventArgs e)
        {
            OnClick_Next(sender, e);   
        }

        private void Previous_Click(object sender, RoutedEventArgs e)
        {
            OnClick_Previous(sender, e);
              
        }











        


    }
}
